package com.ase.test;

/**
 * @author gyhstart
 * @create 2021/2/22 - 21:29
 **/
public class equalsandsame {
    public static void main(String[] args) {
        String a = "HelloWord";
        String b = new String("HelloWord");
        String c = "Hello" + "Word";

        System.out.println(a == b);
        System.out.println(a == c);
        System.out.println(a.equals(b));
        System.out.println(a.equals(c));
        System.out.println(a.intern() == b.intern());
    }
}
